This section covers how you can use Bochs with a remote GDB stub to debug your kernel.
The GDB stub is not active in standard Bochs binary package. So you must recompile Bochs. Download the Bochs source package, untar it and run the configure script with the `--enable-gdb-stub' argument.
$ ./configure --enable-gdb-stub |
Bochs GDB stub waits for a connection on port 1234 on localhost (127.0.0.1). Just start GDB like this;
$ gdb YOUR-KERNEL . . . (gdb) target remote localhost:1234 Remote debugging using localhost:1234 0x0000fff0 in ?? () (gdb) |
Program received signal 0, Signal 0. syscall_testsuite_result (aux=0x1f11fe4) at ../rtmk/syscalls.c:33 33 { (gdb) |